﻿using ModelLayer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WCF
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IListService
    {
        [OperationContract]
        int CreateUser(string fname, string lname, string uname, string email, string pass);

        [OperationContract]
        void AddFriend(string userName, string friendName, string tokenId);

        [OperationContract]
        void AddToBlackList(string userName, string blacklistUserName, string tokenId);

        [OperationContract]
        void RemoveFromBlacklist(string userName, string blacklistUserName, string tokenId);

        [OperationContract]
        void CreateShoppingList(int userId, string listName, long completionDate);

        [OperationContract]
        bool AddUserToShoppingList(int shoppingListId, string friendUserName, string uname, string tokenId);

        [OperationContract]
        void DeleteUserFromShoppingList(int shoppingListId, string friendUserName, string uname, string tokenId);

        [OperationContract]
        void AddProductToShoppingList(int shoppingListId, int productId, int amount);

        [OperationContract]
        void DeleteProductFromShoppingList(int shoppingListId, int productId);

        [OperationContract]
        List<User> SearchUsers(string searchString);

        [OperationContract]
        ModelLayer.User GetUserByUname(string uname);

        [OperationContract]
        String Login(string username, string password);

        [OperationContract]
        void MarkAsBought(int shoppingListId, int productId);

        [OperationContract]
        List<ShoppingList> GetShoppingListsWithUname(string uname);

        [OperationContract]
        List<Product> GetProductsWithListId(int listId);

        [OperationContract]
        List<ModelLayer.User> GetFriends(string uname);

        [OperationContract]
        List<ModelLayer.User> GetSharedUsersForShoppingList(string uname, int slist);
    }
}
